import com.xia.config.SpringConfig;
import com.xia.service.ClassService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {
    public static void main(String[] args) {

        //通过注解创建spring容器
        ApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);
        System.out.println("");

        //获取服务ClassService服务
        ClassService classService = context.getBean(ClassService.class);
        //调用服务接口
        classService.classList();
    }
}
